package com.lantosec.hmrp.modules.system.enumeration;

/**
 * 报表条件判断类型
 */
public enum ReportConditionTypeEnum {
    LIKE("LIKE","模糊"),
    GREATER_THAN(">", "大于"),
    LESS_THAN("<", "小于"),
    GREATER_THAN_EQUAL(">=", "大于等于"),
    LESS_THAN_EQUAL("<=", "小于等于"),
    EQUAL("=", "等于"),
    NOT_EQUAL("<>", "不等于");

    private String type;
    private String name;

    private ReportConditionTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static ReportConditionTypeEnum getByType(String type) {
        for (ReportConditionTypeEnum item : ReportConditionTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item;
            }
        }
        return ReportConditionTypeEnum.EQUAL;
    }
}
